package com.yoga.manager.beanUtil;

import com.yoga.common.bo.YogaUserBO;
import com.yoga.dao.domain.YogaUserDO;

import java.util.ArrayList;
import java.util.List;

/**
 * 类YogaUserBeanUtil.java的实现描述：工具类
 * 
 * @Author hdx
 * @Date 2020年09月24日
 */
public class YogaUserBeanUtil {

    private YogaUserBeanUtil(){
    }

    public static YogaUserDO yogaUserBOToDO(YogaUserBO srcObj) {
        if (srcObj == null) {
            return null;
        }
        YogaUserDO targetObj = new YogaUserDO();
        targetObj.setId(srcObj.getYogaUserId());//id
        targetObj.setUserNo(srcObj.getUserNo());//登录账号，手机号
        targetObj.setUserPasswd(srcObj.getUserPasswd());//登录密码
        targetObj.setUserName(srcObj.getUserName());//真实姓名
        targetObj.setUserNick(srcObj.getUserNick());//用户昵称
        targetObj.setUserHeadImg(srcObj.getUserHeadImg());//用户头像
        targetObj.setSfzNo(srcObj.getSfzNo());//身份证号码
        targetObj.setOpenId(srcObj.getOpenId());//微信id
        targetObj.setOpenNick(srcObj.getOpenNick());//微信昵称
        targetObj.setUserBirthday(srcObj.getUserBirthday());//会员生日
        targetObj.setDeleteMark(srcObj.getDeleteMark());//0、正常，1、已删除
        targetObj.setCreateTime(srcObj.getCreateTime());
        targetObj.setUpdateTime(srcObj.getUpdateTime());
        targetObj.setAboutClassNum(srcObj.getAboutClassNum());
        targetObj.setTopStatus(srcObj.getTopStatus());

        return targetObj;
    }

    public static YogaUserBO yogaUserDOToBO(YogaUserDO srcObj) {
        if (srcObj == null) {
            return null;
        }
        YogaUserBO targetObj = new YogaUserBO();
        targetObj.setYogaUserId(srcObj.getId());//id
        targetObj.setUserNo(srcObj.getUserNo());//登录账号，手机号
        targetObj.setUserPasswd(srcObj.getUserPasswd());//登录密码
        targetObj.setUserName(srcObj.getUserName());//真实姓名
        targetObj.setUserNick(srcObj.getUserNick());//用户昵称
        targetObj.setUserHeadImg(srcObj.getUserHeadImg());//用户头像
        targetObj.setSfzNo(srcObj.getSfzNo());//身份证号码
        targetObj.setOpenId(srcObj.getOpenId());//微信id
        targetObj.setOpenNick(srcObj.getOpenNick());//微信昵称
        targetObj.setUserBirthday(srcObj.getUserBirthday());//会员生日
        targetObj.setDeleteMark(srcObj.getDeleteMark());//0、正常，1、已删除
        targetObj.setCreateTime(srcObj.getCreateTime());
        targetObj.setUpdateTime(srcObj.getUpdateTime());
        targetObj.setTopStatus(srcObj.getTopStatus());


        targetObj.setAboutClassNum(srcObj.getAboutClassNum());
        return targetObj;
    }

    public static List<YogaUserBO> doList2BOList(List<YogaUserDO> doList) {
        List<YogaUserBO> boList = new ArrayList<>();

        return null;
    }
}